package com.example.springboot.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 管理员表
 * </p>
 *
 * @author jiang
 * @since 2025-04-17
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("admin")
@Schema(name = "AdminEntity", description = "管理员表")
public class AdminEntity extends Model<AdminEntity> {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "账号")
    @TableField("account")
    private String account;

    @Schema(description = "密码")
    @TableField("password")
    private String password;

    @Schema(description = "头像")
    @TableField("avatar")
    private String avatar;

    @Schema(description = "角色")
    @TableField("role")
    private String role;

    @Schema(description = "姓名")
    @TableField("name")
    private String name;

    public static final String ID = "id";

    public static final String ACCOUNT = "account";

    public static final String PASSWORD = "password";

    public static final String AVATAR = "avatar";

    public static final String ROLE = "role";

    public static final String NAME = "name";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
